package com.adams.access.db.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 
 * 
 * File Name : ViewEvent.java
 * 
 * @Description : 页面事件实体
 */
@Entity
@Table(name = "T_VIEW_EVENT_INFO")
public class ViewEvent extends EntityObject
{

	private static final long serialVersionUID = 2856548993729641197L;

	private Integer orderid = 0;// 页面上排列顺序

	private String xtype;// 按钮标识

	private String text;// 标识

	private String action;// 动作url

	private String icon;// 图标

	private String actionType;// 动作类型

	private String eventType;// 属性 t-bar；listen
	public static String EVENTTYPE_TBAR = "tbar";
	public static String EVENTTYPE_LISENTERS = "lisenters";

	private Long viewpanelid;// 页面面板主键

	private Long viewwinid;// 页面窗口主键

	private String tips;// 快速提示信息

	@Column(name = "VIEWWINID")
	public Long getViewwinid()
	{
		return viewwinid;
	}

	public void setViewwinid(Long viewwinid)
	{
		this.viewwinid = viewwinid;
	}

	@Column(name = "ORDERID")
	public Integer getOrderid()
	{
		return orderid;
	}

	/**
	 * @param orderid
	 *            the orderid to set
	 */
	public void setOrderid(Integer orderid)
	{
		if (null != orderid)
		{
			this.orderid = orderid;
		}
	}

	@Column(name = "XTYPE")
	public String getXtype()
	{
		return xtype;
	}

	/**
	 * @param xtype
	 *            the xtype to set
	 */
	public void setXtype(String xtype)
	{
		this.xtype = xtype;
	}

	@Column(name = "TEXT")
	public String getText()
	{
		return text;
	}

	/**
	 * @param text
	 *            the text to set
	 */
	public void setText(String text)
	{
		this.text = text;
	}

	@Column(name = "ACTION")
	public String getAction()
	{
		return action;
	}

	/**
	 * @param action
	 *            the action to set
	 */
	public void setAction(String action)
	{
		this.action = action;
	}

	@Column(name = "ICON")
	public String getIcon()
	{
		return icon;
	}

	/**
	 * @param iconCls
	 *            the iconCls to set
	 */
	public void setIcon(String icon)
	{
		this.icon = icon;
	}

	@Column(name = "ACTION_TYPE")
	public String getActionType()
	{
		return actionType;
	}

	/**
	 * @param actionType
	 *            the actionType to set
	 */
	public void setActionType(String actionType)
	{
		this.actionType = actionType;
	}

	@Column(name = "VIEWPANELID")
	public Long getViewpanelid()
	{
		return viewpanelid;
	}

	/**
	 * @param viewpanelid
	 *            the viewpanelid to set
	 */
	public void setViewpanelid(Long viewpanelid)
	{
		this.viewpanelid = viewpanelid;
	}

	@Column(name = "EVENT_TYPE")
	public String getEventType()
	{
		return eventType;
	}

	public void setEventType(String eventType)
	{
		this.eventType = eventType;
	}

	@Column(name = "TIPS", length = 50)
	public String getTips()
	{
		return tips;
	}

	public void setTips(String tips)
	{
		this.tips = tips;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + id.hashCode();
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ViewEvent other = (ViewEvent) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
